package com.code.controller;

import com.code.bean.Car;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author fanxs
 * @Date 2022/04/21 14:37
 * @Description
 */
@RestController
public class HelloController {
    @RequestMapping("/hello")
    public String handle01(){
        return "Hello, Spring Boot 2!";
    }

    @Autowired
    Car car;

    @RequestMapping("/car")
    public Car car() {
        return car;
    }
}
